package com.flea.hclv.controller;

import com.flea.hclv.service.HCarReservePayinfoService;
import com.flea.hclv.util.ServerResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * @program: project
 * @description: 车队支付
 * @author: shiliqiang
 * @create: 2019-03-03 09:38
 * @version: 1.0
 */
@RequestMapping("/flea/hclv/car/reserve/payinfo/")
@Controller
public class HCarReservePayinfoController {
    @Autowired
    private HCarReservePayinfoService hCarReservePayinfoService;

    @RequestMapping("add")
    @ResponseBody
    public ServerResponse<String> addPayInfo(HttpServletRequest request,String model) throws Exception {
        ServerResponse<String> response = hCarReservePayinfoService.addPayInfo(request,model);
        return response;
    }
    //获取已经支付的钱
    @RequestMapping("getPayMoney")
    @ResponseBody
    public ServerResponse<Map<String,String>> getPayMoney(String carReserveId) {
        ServerResponse<Map<String,String>> response = hCarReservePayinfoService.getPayMoney(carReserveId);
        return response;
    }

}
